import SumPanel from '@/views/finance/components/bill/SumPanel'

export default{
  components:{
    SumPanel
  },
  data(){
    return {
      // 全部汇总
      sumLabel:{
        totalOilAmount:'加油总金额(元)',
        totalRebateAmount:'让利总金额(元)',
        settlementAmount:'应结算总金额(元)',
        totalSlottingAmount:'通道费总金额(元)',
        amountActivityMerchant:'商家承担直降总金额(元)',
        amountPlatformCouponMerchant:'商家承担平台优惠券总金额(元)',
        merchantCouponAmount:'商家优惠券总金额(元)',
        realSettlementAmount:'实际结算总金额(元)'
      },
      sumInfo:{
        totalOilAmount: '0.00',
        totalRebateAmount: '0.00',
        settlementAmount: '0.00',
        totalSlottingAmount: '0.00',
        amountActivityMerchant: '0.00',
        amountPlatformCouponMerchant: '0.00',
        merchantCouponAmount: '0.00',
        realSettlementAmount: '0.00'
      },
      // 团油收单汇总
      sumTuanLabel:{
        totalOilAmount:'加油总金额(元)',
        totalRebateAmount:'让利总金额(元)',
        settlementAmount:'应结算总金额(元)',
        totalSlottingAmount:'通道费总金额(元)',
        amountActivityMerchant:'商家承担直降总金额(元)',
        amountPlatformCouponMerchant:'商家承担平台优惠券总金额(元)',
        merchantCouponAmount:'商家优惠券总金额(元)',
        realSettlementAmount:'实际结算总金额(元)'
      },
      sumTuanInfo:{
        totalOilAmount: '0.00',
        totalRebateAmount: '0.00',
        settlementAmount: '0.00',
        totalSlottingAmount: '0.00',
        amountActivityMerchant: '0.00',
        amountPlatformCouponMerchant: '0.00',
        merchantCouponAmount: '0.00',
        realSettlementAmount: '0.00'
      },
      // pos收单汇总
      sumPosLabel:{
        totalOilAmount:'加油总金额(元)',
        settlementAmount:'应结算总金额(元)',
        totalSlottingAmount:'通道费总金额(元)',
        realSettlementAmount:'实际结算总金额(元)'
      },
      sumPosInfo:{
        totalOilAmount: '0.00',
        settlementAmount: '0.00',
        totalSlottingAmount: '0.00',
        realSettlementAmount: '0.00'
      },
      pickerOptions: {
        onPick: ({ maxDate, minDate }) => {
          this.selectDate = minDate.getTime();
          if (maxDate) {
            this.selectDate = ''
          }
        },
        // 限制时间选择范围32天
        disabledDate: (time) => {
          if (this.selectDate !== '') {
            const one = 31 * 24 * 3600 * 1000;
            const minTime = this.selectDate - one;
            const maxTime = this.selectDate + one;
            return time.getTime() < minTime || time.getTime() > maxTime
          }
        }
      }
    }
  }
}
